package 动态规划9月;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;

public class Ex1 {
    static int sum=0;
    public static void main(String[] args) throws Exception {
//        String urlString=null;
//        Scanner scanner=new Scanner(System.in);
//        urlString=scanner.next();
//        URL url = new URL("http://"+urlString);
//        URLConnection conn = url.openConnection();
//        BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
//        String inputLine;
//
//        while ((inputLine = in.readLine()) != null)
//        {
//            System.out.println(inputLine);
//        }
//        in.close();
//        scanner.close();
        Comput(5,1);
    }
    static void Comput(int score, int num)
    {
        int store[]=new int[10];
        if(score<0 || score>(num+1)*10)		//退出递归
            return ;
        if(num==0)                  //打到最后一次
        {
            store[num]=score;
            System.out.println(sum);
            return;
        }
        for(int i=0;i<=10;i++)                 //没有出现上述情况，递归
        {
            store[num]=i;
            Comput(score-i,num-1);
        }
    }

}
/*


int sum;
int store[10];
void Output()          //打印
{
	for(int i=9;i>=0;i--)
	{
		cout<<store[i]<<" ";
	}
	cout<<endl;
	++sum;
}

void Comput(int score, int num)
{
	if(score<0 || score>(num+1)*10)		//退出递归
		return ;
	if(num==0)                  //打到最后一次
	{
		store[num]=score;
		Output();
		return;
	}
	for(int i=0;i<=10;i++)                 //没有出现上述情况，递归
	{
		store[num]=i;
		Comput(score-i,num-1);
	}
}

int main()
{
	Comput(90,9);
	cout<<sum<<endl;
	return 0;


 */